﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GenericTools
{
    public class ListBoxSelectionEventArgs : EventArgs
    {
        #region Public Enumeration
        /// <summary>
        /// Movements associated with this event
        /// </summary>
        public enum MovementType
        {
            /// <summary>
            /// Item is moved from selected list to available list
            /// </summary>
            SELECTED_TO_AVAILABLE = 0,

            /// <summary>
            /// Item is moved from available list to selected list
            /// </summary>
            AVAILABLE_TO_SELECTED = 1
        }
        #endregion

        #region Class Variables
        private ListItem item;
        private ListBox source;
        private ListBox destination;
        private MovementType type;
        #endregion

        #region Constructors
        public ListBoxSelectionEventArgs(ListItem item, ListBox source, ListBox destination, MovementType type)
        {
            this.item = item;
            this.source = source;
            this.destination = destination;
            this.type = type;
        }
        #endregion

        #region Public Properties
        /// <summary>
        /// ListItem object being moved
        /// </summary>
        public ListItem Item
        {
            get
            {
                return this.item;
            }
        }

        /// <summary>
        /// Source ListBox object
        /// </summary>
        public ListBox Source
        {
            get
            {
                return this.source;
            }
        }

        /// <summary>
        /// Destination ListBox object
        /// </summary>
        public ListBox Destination
        {
            get
            {
                return this.destination;
            }
        }

        /// <summary>
        /// Movement Type
        /// </summary>
        public MovementType Type
        {
            get
            {
                return this.type;
            }
        }
        #endregion
    }
}
